package cc.rengu.redp.flowable.bizmodel.db.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * 模型字段配置表
 *
 * @author System
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("T_BIZ_CFG_FIELD")
public class BizCfgField implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "FIELD_ID")
    private Long fieldId;

    /**
     * 业务数据模型ID
     */
    @TableField("MODEL_ID")
    private Long modelId;

    /**
     * 字段名称
     */
    @TableField("FIELD_NAME")
    private String fieldName;

    /**
     * 父字段名称
     */
    @TableField("FATHER_FIELD_NAME")
    private String fatherFieldName;

    /**
     * 字段描述
     */
    @TableField("FIELD_DESC")
    private String fieldDesc;

    /**
     * 是否主值
     */
    @TableField("IS_PRI_KEY")
    private Boolean isPriKey;

    /**
     * 是否建立索引
     */
    @TableField("IS_INDEX")
    private Boolean isIndex;

    /**
     * 是否建立数据字典
     */
    @TableField("IS_DICT")
    private Boolean isDict;

    /**
     * 字段类型
     */
    @TableField("FIELD_TYPE")
    private String fieldType;

    @TableField(exist = false)
    private List<BizCfgAlg> algData;

    @TableField(exist = false)
    private int algCount;

    @TableField(exist = false)
    private int key;
}
